You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[cudax][cuco] Migrate host insert_if APIs for fixed_capacity_set - #12356
This PR migrates the host insert_if and insert_if_async APIs from cuCollections static_set to fixed_capacity_set, reusing the shared open-addressing implementation.
Checklist
New or existing tests cover these changes.
The documentation is up to date with these changes.
Add host insert_if and insert_if_async to cudax::cuco::fixed_capacity_set,
forwarding to the shared open-addressing implementation, and cover them in
the insert and contains test with a stencil distinct from the keys.
Reviewing files that changed from the base of the PR and between 0f90671 and a9845ab.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
New Features
Added conditional bulk insertion to fixed-capacity sets, selecting keys according to a predicate applied to corresponding stencil values.
Synchronous insertion reports the number of newly added keys; asynchronous insertion runs without returning a count. Both skip duplicates and keys that cannot fit.
Added coverage for synchronous and asynchronous conditional insertion, including verifying which keys are present afterward.
The fixed-capacity set adds synchronous and asynchronous stencil-predicated insertion APIs. Tests check the inserted-key count and membership for keys selected by a predicate.
Changes: Conditional insertion
Layer / File(s)
Summary
Insertion APIs and validation cudax/include/cuda/experimental/__cuco/fixed_capacity_set.cuh, cudax/test/cuco/fixed_capacity_set/test_insert_and_contains.cu
Adds synchronous and asynchronous stencil-predicated insertion methods. Tests check the synchronous insertion count and verify membership after both calls.
Assessment against linked issues
Objective
Addressed
Explanation
Migrate host insert_if APIs to fixed_capacity_set and add tests [#11134]
✅
Possibly related PRs
NVIDIA/cccl#11869: Adds the fixed_capacity_set APIs and shared implementation that these insertion methods extend.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cucocuCollectionscudaxFeature intended for the cudax experimental library
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #11134.
This PR migrates the host
insert_ifandinsert_if_asyncAPIs from cuCollectionsstatic_settofixed_capacity_set, reusing the shared open-addressing implementation.Checklist